home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_tcl80.idb / usr / freeware / include / tcl / tclRegexp.h.z / tclRegexp.h
Encoding:
C/C++ Source or Header  |  1999-04-16  |  1.2 KB  |  49 lines

  1. /*
  2.  * Definitions etc. for regexp(3) routines.
  3.  *
  4.  * Caveat:  this is V8 regexp(3) [actually, a reimplementation thereof],
  5.  * not the System V one.
  6.  *
  7.  * RCS: @(#) $Id: tclRegexp.h,v 1.4 1998/09/14 18:40:02 stanton Exp $
  8.  */
  9.  
  10. #ifndef _REGEXP
  11. #define _REGEXP 1
  12.  
  13. #ifndef _TCL
  14. #include "tcl.h"
  15. #endif
  16.  
  17. #ifdef BUILD_tcl
  18. # undef TCL_STORAGE_CLASS
  19. # define TCL_STORAGE_CLASS DLLEXPORT
  20. #endif
  21.  
  22. /*
  23.  * NSUBEXP must be at least 10, and no greater than 117 or the parser
  24.  * will not work properly.
  25.  */
  26.  
  27. #define NSUBEXP  20
  28.  
  29. typedef struct regexp {
  30.     char *startp[NSUBEXP];
  31.     char *endp[NSUBEXP];
  32.     char regstart;        /* Internal use only. */
  33.     char reganch;        /* Internal use only. */
  34.     char *regmust;        /* Internal use only. */
  35.     int regmlen;        /* Internal use only. */
  36.     char program[1];    /* Unwarranted chumminess with compiler. */
  37. } regexp;
  38.  
  39. EXTERN regexp *TclRegComp _ANSI_ARGS_((char *exp));
  40. EXTERN int TclRegExec _ANSI_ARGS_((regexp *prog, char *string, char *start));
  41. EXTERN void TclRegSub _ANSI_ARGS_((regexp *prog, char *source, char *dest));
  42. EXTERN void TclRegError _ANSI_ARGS_((char *msg));
  43. EXTERN char *TclGetRegError _ANSI_ARGS_((void));
  44.  
  45. # undef TCL_STORAGE_CLASS
  46. # define TCL_STORAGE_CLASS DLLIMPORT
  47.  
  48. #endif /* REGEXP */
  49.